#include "decorator.h"
#include <iostream>
#include<mutex>
extern std::mutex g_mutex;
Decorator::Decorator()
{

}
Decorator::~Decorator()
{

}
Decorator::Decorator(std::shared_ptr<Component> component):m_component(component)
{

}
void Decorator::operation(){
    std::lock_guard<std::mutex> lock(g_mutex);
    std::cout << "Decorator::operation " <<std::endl;
    if(nullptr!=m_component){
       m_component->operation();
    }
}
